import React from 'react';
import {
  BrowserRouter,
  Switch,
  Route,
  Redirect
} from "react-router-dom";
import Index from '../views/index';
import Detail from '../views/detail';


const Root = () => (
  <BrowserRouter>
    <Switch>
      <Redirect exact rom="/" to="/index" />
      <Route path="/index">
        <Index />
      </Route>
      <Route path="/detail">
        <Detail />
      </Route>
    </Switch>
  </BrowserRouter>
);

export default Root()
